Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Hash for Scalar #674

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Conversation

jirijakes
Copy link
Contributor

Unless there is some safety concern I cannot see, having Scalar implementing Hash would be useful.

Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK f87dc91

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 18, 2024

It has the same security issue as comparison traits which is documented, so this is OK.

@apoelstra
Copy link
Member

I don't think we need to worry about constant-timeness with Hash. Hash functions are typically straight-line code where every operation after the first round is applied to statistically-random data.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK f87dc91

@apoelstra apoelstra merged commit f96fcd8 into rust-bitcoin:master Jan 18, 2024
20 checks passed
@Kixunil
Copy link
Collaborator

Kixunil commented Jan 18, 2024

@apoelstra this is the non-cryptographic one so I wouldn't bet on it. But again, there's a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants